public  class AccountSearchRedirectReportController{
    private  string recordTypes;
    
    private  string aasAgencyRecordTypeID = RecordTypeHelper.GetRecordTypeIdByDevName('Account','AAS_Agency_Account');
    private  string cmrAgencyRecordTypeID = RecordTypeHelper.GetRecordTypeIdByDevName('Account','CMR_Agency');
    private  string cmrAgencyClientRecordTypeID = RecordTypeHelper.GetRecordTypeIdByDevName('Account','CMR_Agency_Client');
    private  string aasSalesAccountRecordTypeID = RecordTypeHelper.GetRecordTypeIdByDevName('Account','Advanced_Ad_Solutions');
    private  string aasMasterClientRecordTypeID = RecordTypeHelper.GetRecordTypeIdByDevName('Account','AAS_Master_Client');
    private  string cmrMasterClientRecordTypeID = RecordTypeHelper.GetRecordTypeIdByDevName('Account','NS_Master_Client');
    
      public AccountSearchRedirectReportController() {
            //get the recordtype id's and form comma seperated string.
            //pv5 will have comma seperated recordtype names (two of them)
            string filterBy = ApexPages.currentPage().getParameters().get('pv5');
            System.Debug('sree' + filterBy );
            Set<String> filter;  
            if(filterBy == 'agency'){
                   recordTypes = aasAgencyRecordTypeID.substring(0,15) + ',' + cmrAgencyRecordTypeID.substring(0,15) ;        
                   }
            else if(filterBy == 'agencyClient'){
                   recordTypes = cmrAgencyClientRecordTypeID.substring(0,15) + ',' + aasSalesAccountRecordTypeID.substring(0,15) ;        
                   }
            else if(filterBy == 'masterClient')  {              
                   recordTypes = aasMasterClientRecordTypeID.substring(0,15) + ',' + cmrMasterClientRecordTypeID.substring(0,15) ;                    
                   }
            else //all 
            {
                   recordTypes  = aasAgencyRecordTypeID.substring(0,15) + ',' + cmrAgencyRecordTypeID.substring(0,15) + ',';              
                   recordTypes += cmrAgencyClientRecordTypeID.substring(0,15) + ',' + aasSalesAccountRecordTypeID.substring(0,15) + ',' ;        
                   recordTypes += aasMasterClientRecordTypeID.substring(0,15) + ',' + cmrMasterClientRecordTypeID.substring(0,15)  ;                    
            }
      }

      public string getrecordTypeIds() {
            return recordTypes;
      }

    
}